<?php

require_once BASE_PATH.'application/models/basedao'.EXT;

class embarazada_correocontactodao extends baseDAO {
	
	var $table = 'embarazada_correocontacto';
	var $key   = 'id_embarazada_correocontacto';
	var $sql   = '';

	function __construct()
	{
	    parent::__construct();
	}
	function _defaultSQL()
	{
		$this->db->select('id_embarazada_correocontacto, id_embarazada, correo');
	}
	
    function get_emailAddresses($id_embarazada){
        $this->db->select('correo');
	    $this->db->where('id_embarazada', $id_embarazada);
	    $query = $this->db->get($this->table);
	    return $query->result_array();
    }
    
    function insert_batch($data) {
        $result = $this->db->insert_batch($this->table, $data); 
        return $result;    
    }
    
    function delete($id_embarazada) {
        $this->db->where('id_embarazada', $id_embarazada);
        $result = $this->db->delete($this->table);
        return $result;
    }
    
}

?>

